package oop6.printer;

/**
 * @author oldliu
 * @since 1.0
 */
public class Printer {
    private String brand;
    private int price;
    //打印机实现了墨水接口规范
    private Ink ink;
    //打印机预留了纸张的接口规范
    private Paper paper;

    public void print(String msg){
        System.out.println("这个打印机是"+brand);
        System.out.println("价格是"+price+"圆");
        System.out.println("使用"+ink.getColor()+"墨水打印");
        paper.print(msg);
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public void setInk(Ink ink) {
        this.ink = ink;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }
}
